home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1 Issue 2
/
PDCD-1 - Issue 02.iso
/
_utilities
/
utilities
/
004
/
gstobject
/
set
/
Example
/
c
/
Adh
next >
Wrap
Text File
|
1994-09-24
|
791b
|
42 lines
#include <stdio.h>
#include <stdlib.h>
#include "C:h.Adhesive"
#include "C:h.kernel"
/* external request table */
extern Adhesive_Request cahg_need_ObjectsNeeded;
/* our user handle */
Adhesive_User userHandle=NULL;
static void checkErr(_kernel_oserror *err)
{ /* does nothing if passed a zero pointer
else displays error and does not return
*/
if (err) {
fprintf(stderr,"Adhesive error: %s\n",err->errmess);
exit(EXIT_FAILURE);
}
}
static void deRegister(void)
{
checkErr(adhesive_Deregister(&userHandle));
}
void initAdhesive(void)
{
Adhesive_UserInfo info;
info.flags=0;
info.name="Test set object from C";
atexit(deRegister);
checkErr(adhesive_Register(&userHandle,&info));
checkErr(adhesive_Request(&userHandle,&cahg_need_ObjectsNeeded));
}